//
//  NSString+DES.h
//  jiedanbao
//
//  Created by sdb on 15/6/26.
//  Copyright (c) 2015年 sdb. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSString (DES)
NS_ASSUME_NONNULL_BEGIN
/** DES加密,输出base64字符串 */
- (NSString *)desEncryptWithKey:(NSString *)key;
/** DES解密,输出base64字符串 */
- (NSString *)desDecryptWithKey:(NSString *)key;
/** 3DES加密,输出16进制字符串 */
- (NSString *)des3EncryptWithKey:(NSString *)key;
/** 3DES解密,输出16进制字符串 */
- (NSString *)des3DecryptWithKey:(NSString *)key;

/** NSData转16进制字符串 */
+ (NSString *)convertDataToHexStr:(NSData *)data;
/** 16进制字符串转NSData */
+ (NSData *)convertHexStrToData:(NSString *)str;
NS_ASSUME_NONNULL_END
@end
